const ejs = require('ejs')

let loginStatus = true

let result = ejs.render(`
    <% if(loginStatus){ %>
    <h1>welcome back</h1>
    <% }else{ %>
    <button>去登录</button>
    <% } %>
    `,{loginStatus})

console.log(result)